/**
 * 全局的权限配置
 * */
export default function access(initialState: { currentUser?: API.CurrentUser } | undefined) {
  const { currentUser } = initialState ?? {};
  return {
    canAdmin: currentUser && currentUser.role === 1,   //用户的role字段值为1代表为管理员
  };
}
